﻿<!doctype html>
<html lang="zh-CN">
<head>
    <hi:pagetitle runat="server" />
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;"
        name="viewport" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" href="http://res.juseshop.com/utility/bootflat/css/bootstrap.min.css" rev="stylesheet"
        type="text/css">
    <link rel="stylesheet" href="http://res.juseshop.com/utility/bootflat/bootflat/css/bootflat.min.css" rev="stylesheet"
        type="text/css">
    <link rel="stylesheet" href="http://res.juseshop.com/utility/icomoon/style.css" rev="stylesheet" type="text/css">
    <link rel="stylesheet" href="http://res.juseshop.com/templates/master/jusekeji/style/css.css" rev="stylesheet" type="text/css">
    <link rel="stylesheet" href="http://res.juseshop.com/templates/master/jusekeji/style/main.css" rev="stylesheet" type="text/css">
    <script src="/script/jquery-1.11.0.min.js"></script>
    <script src="http://res.juseshop.com/utility/bootflat/js/bootstrap.min.js"></script>
    <script src="/script/jquery.slides.min.js"></script>
    <script src="http://res.juseshop.com/utility/common.js" type="text/javascript"></script>
    <script src="/script/main.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            var type = GetAgentType();
            // 设置标题
            if (type == 2)
                window.HiCmd.webSetTitle($("title").html());
            else if (type == 1)
                loadIframeURL("hishop://webSetTitle /null/" + encodeURIComponent($("title").html()));

            // 登录
            var username = getCookie("Vshop-Member");
            if (username == undefined || username == "") {// 如果web端没登录                
                if (type == 2) {// 安卓
                    var sessionid = window.HiCmd.webGetSession();
                    if (sessionid != "")
                        loadIframeURL("/AppShop/AppLogin.aspx?sessionid=" + window.HiCmd.webGetSession());
                    else
                        window.HiCmd.webLogin("openLogin");
                }
                else if (type == 1)// ios
                    loadIframeURL("hishop://webGetSession/loadSessionid/null");
            }
        });

        function loadSessionid(sessionid) {
            if (sessionid != "")
                loadIframeURL("/AppShop/AppLogin.aspx?sessionid=" + sessionid);
            else
                loadIframeURL("hishop://webLogin/openLogin/null");
        }

        function openLogin(ret, sessionId) {
            if (ret == 0)
                loadIframeURL("/AppShop/AppLogin.aspx?sessionid=" + sessionid);
        }
    </script>
</head>
<body>
